//
//  SEGWinRecordDetailModel.m
//  ExcellentHome
//
//  Created by 揭婧雯 on 2017/8/21.
//  Copyright © 2017年 陈区. All rights reserved.
//

#import "SEGWinRecordDetailModel.h"

@implementation SEGWinRecordDetailModel

- (instancetype)initWithDictionary:(NSDictionary*)dictionary
{
    self = [super init];
    if (self) {
        _reciveTel = @"";
        _compNum = @"";
        _rechargeTel = @"";
        _comp = @"";
        _prizeType = @"";
        _sendStatus = @"";
        _cardNum = @"";
        _reciveAddr = @"";
        _winnerId = @"";
        _reciveName = @"";
        _acceptNum = @"";
        _cardPass = @"";
        _prizeName = @"";
        _winnerTime = @"";
        _actName = @"";
        _isInvalid = 0;
        _prizeTime = @"";
        [self setValuesForKeysWithDictionary:dictionary];
    }
    return self;
}
+ (instancetype)initWithDictionary:(NSDictionary*)dictionary
{
    return [[self alloc] initWithDictionary:dictionary];
}
- (void)setValue:(id)value forUndefinedKey:(NSString*)key
{}
- (void)setReciveTel:(NSString*)reciveTel{
    _reciveTel = [[SEGUtils ValueToString:reciveTel]copy];
}
- (void)setCompNum:(NSString*)compNum{
    _compNum = [[SEGUtils ValueToString:compNum]copy];
}
- (void)setRechargeTel:(NSString*)rechargeTel{
    _rechargeTel = [[SEGUtils ValueToString:rechargeTel]copy];
}
- (void)setComp:(NSString*)comp{
    _comp = [[SEGUtils ValueToString:comp]copy];
}
- (void)setPrizeType:(NSString*)prizeType{
    _prizeType = [[SEGUtils ValueToString:prizeType]copy];
}
- (void)setSendStatus:(NSString*)sendStatus{
    _sendStatus = [[SEGUtils ValueToString:sendStatus]copy];
}
- (void)setCardNum:(NSString*)cardNum{
    _cardNum = [[SEGUtils ValueToString:cardNum]copy];
}
- (void)setReciveAddr:(NSString*)reciveAddr{
    _reciveAddr = [[SEGUtils ValueToString:reciveAddr]copy];
}
- (void)setWinnerId:(NSString*)winnerId{
    _winnerId = [[SEGUtils ValueToString:winnerId]copy];
}
- (void)setReciveName:(NSString*)reciveName{
    _reciveName = [[SEGUtils ValueToString:reciveName]copy];
}
- (void)setAcceptNum:(NSString*)acceptNum{
    _acceptNum = [[SEGUtils ValueToString:acceptNum]copy];
}
- (void)setCardPass:(NSString*)cardPass{
    _cardPass = [[SEGUtils ValueToString:cardPass]copy];
}
- (void)setPrizeName:(NSString*)prizeName{
    _prizeName = [[SEGUtils ValueToString:prizeName]copy];
}
- (void)setWinnerTime:(NSString*)winnerTime{
    _winnerTime = [[SEGUtils ValueToString:winnerTime]copy];
}
- (void)setActName:(NSString*)actName{
    _actName = [[SEGUtils ValueToString:actName]copy];
}
- (void)setIsInvalid:(NSInteger)isInvalid {
    _isInvalid = isInvalid;
}
- (void)setPrizeTime:(NSString *)prizeTime {
    _prizeTime = [[SEGUtils ValueToString:prizeTime] copy];
}

/**
 是否是活动失效状态
 - 积分活动和充值卡活动不做判断
 - 线下实物在【未发放&活动失效】的时候显示失效状态
 - 话费和线上实物在【未发放&活动失效&没有领取(即没有提交电话或地址)】时显示失效状态
 - 话费和线上实物在【未发放&活动失效&已经填写了领取电话或地址】时显示未发放
 @return 是否
 */
- (BOOL)isInvaildState {
    // 是否失效逻辑暂由后台判断
    if (self.isInvalid == 1) {
        return YES;
    }
    return NO;
}

@end
